package com.zrrd.learn.chapter08面向对象.综合类设计题;

import java.util.Date;

/**
 * 测试图书管理系统
 *
 * @author wrn
 * @version 1.0
 * @date 2023/8/9 9:06
 */

public class TestBook {

    public static void main(String[] args) {

        Book b1 = new Book("hhhh" ,"xh",101,10);
        Book b2 = new Book("jjjj" ,"xj",102,10);
        Book b3 = new Book("kkkk" ,"xk",103,10);

        User u1 = new User();
        User u2 = new User();
        User u3 = new User();

        u1.setUserName("xxx");
        u2.setUserName("xxxx");
        u3.setUserName("xxxxx");


        Thread t1= new Thread(()->{
            u1.borrowBooks(b1, 2);
        },"1");

        Thread t2= new Thread(()->{
            u2.borrowBooks(b1, 2);
        },"2");

        Thread t3= new Thread(()->{
            u3.borrowBooks(b1, 2);
        },"3");

        t1.start();
        t2.start();
        t3.start();
        BorrowRecord bor1 = new BorrowRecord(b1,u1,"date","date");
    }

}
